<template>
	<div class="mainWrapper abnormal">
		<el-breadcrumb separator="/">
			<el-breadcrumb-item :to="{ path: '/' }"><i class="lh lh-diaodu fw_100"></i></el-breadcrumb-item>
			<el-breadcrumb-item>调度中心</el-breadcrumb-item>
			<el-breadcrumb-item>人找活</el-breadcrumb-item>
		</el-breadcrumb>

		<div class="content_Box box-shadow">
			<div class="pt_5 px_15">
				<el-form :inline="true" class="form-inline" @keyup.enter.native="shearchBtn()">
					<el-form-item
						><el-input size="mini" class="w_80" v-model="s_staff_name" placeholder="姓名"></el-input
					></el-form-item>
					<el-form-item
						><el-input size="mini" class="w_110" v-model="s_mobile" placeholder="手机号"></el-input
					></el-form-item>

					<el-form-item>
						<el-date-picker
							size="mini"
							class="w_90i"
							v-model="s_next_date"
							type="date"
							value-format="yyyy-MM-dd"
							format="MM-dd"
							placeholder="选择日期"
							:clearable="false"
						></el-date-picker>
					</el-form-item>

					<el-form-item>
						<el-select v-model="s_area_id" multiple collapse-tags placeholder="商圈">
							<el-button
								size="mini"
								type="primary"
								class="round-right all-area"
								@click="selectAllArea()"
								native-type="button"
								>{{ areaStatus ? '全选' : '取消全选' }}</el-button
							>
							<el-option v-for="item in areaList" :key="item.id" :label="item.area_name" :value="item.id"></el-option>
						</el-select>
					</el-form-item>

					<el-form-item>
						<el-select size="mini" class="w_110" v-model="s_type_id" placeholder="岗位">
							<el-option v-for="item in TypeArr" :key="item.id" :label="item.label_name" :value="item.id"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item>分配时长</el-form-item>

					<el-form-item><el-input size="mini" class="w_50" v-model="s_sc_start"></el-input></el-form-item>
					<el-form-item>~</el-form-item>
					<el-form-item><el-input size="mini" class="w_50" v-model="s_sc_next"></el-input></el-form-item>

					<el-form-item>
						<el-select size="mini" class="w_60" v-model="s_next_sex" placeholder="性别">
							<el-option label="不限" value=""></el-option>
							<el-option label="男" value="male"></el-option>
							<el-option label="女" value="female"></el-option>
						</el-select>
					</el-form-item>

					<el-form-item
						><el-input size="mini" class="w_50" v-model="s_next_start" placeholder="年龄"></el-input
					></el-form-item>
					<el-form-item>~</el-form-item>
					<el-form-item
						><el-input size="mini" class="w_50" v-model="s_next_next" placeholder="年龄"></el-input
					></el-form-item>

					<el-form-item>总出工次数</el-form-item>

					<el-form-item><el-input size="mini" class="w_50" v-model="s_cg_start"></el-input></el-form-item>
					<el-form-item>~</el-form-item>
					<el-form-item><el-input size="mini" class="w_50" v-model="s_cg_next"></el-input></el-form-item>

					<el-form-item>审核天数</el-form-item>

					<el-form-item><el-input size="mini" class="w_50" v-model="s_sh_start"></el-input></el-form-item>
					<el-form-item>~</el-form-item>
					<el-form-item><el-input size="mini" class="w_50" v-model="s_sh_next"></el-input></el-form-item>

					<el-button size="mini" type="primary" class="round-right" @click="shearchBtn()" native-type="button"
						>搜索</el-button
					>
					<el-button size="mini" round @click="resetBtn">重置</el-button>
				</el-form>
			</div>
			<div class="pb_5 px_15 mb_5" id="dd-row-2">
				<el-row>
					<el-col :span="14">
						<el-button size="mini" class="fl" :type="status == 2 ? 'warning' : 'default'" @click="tagstate(2)"
							>未分配完成({{ is_over_2 }})</el-button
						>
						<el-button size="mini" class="fl" :type="status == 3 ? 'warning' : 'default'" @click="tagstate(3)"
							>部分分配({{ part_assigned }})</el-button
						>
						<el-button size="mini" class="fl" :type="status == 1 ? 'warning' : 'default'" @click="tagstate(1)"
							>分配完成({{ is_over_1 }})</el-button
						>
					</el-col>

					<el-col :span="10">
						<!-- 简洁分页组件 -->
						<pagemini :total="total" class="fr" :pageNums="pageNum" @pagedata="onChildValue"></pagemini>
					</el-col>
				</el-row>
			</div>

			<div class="tableMaxBox">
				<template>
					<el-table
						:data="demandList"
						stripe
						ref="multipleTable"
						@selection-change="handleSelectionChange"
						:show-overflow-tooltip="false"
						height="440"
					>
						<el-table-column type="selection" align="center" width="50"></el-table-column>
						<el-table-column prop="name" label="姓名" width="110">
							<!-- <template slot-scope="{ row, $index }">
                                <span>{{ row.name }}</span>
                            </template> -->
							<template slot-scope="{ row, $index }">
								<el-tooltip effect="light" placement="top" :open-delay="500">
									<div class="wrap_show" slot="content">
										<div>
											<img :src="user_history.avatar" alt="头像" />
											<el-rate
												v-model="user_history.level"
												:colors="colors"
												disabled
												style="margin-top: 10px;"
											></el-rate>
										</div>
										<div>
											<div class="show_line">
												<div style="width: 110px; text-align: right;">平台服务经历：</div>
												<div v-if="user_history.service_history.length != 0">
													<div v-for="(item, index) in user_history.service_history" :key="index">
														<span v-if="item.is_this == false" style="display: inline-block; width: 130px;">{{
															item.shop_name
														}}</span>
														<span
															v-if="item.is_this == true"
															style="display: inline-block; width: 130px; color: var(--orange1);"
															>{{ item.shop_name }}</span
														>
														<span v-if="item.is_this == false">{{ item.task_num }}次</span>
														<span v-if="item.is_this == true" style="color: var(--orange1);"
															>{{ item.task_num }}次</span
														>
													</div>
												</div>
												<div v-if="user_history.service_history.length == 0">
													无
												</div>
											</div>
											<div class="show_line">
												<div style="width: 110px; text-align: right;">工作经历：</div>
												<div v-if="user_history.task_history.length != 0">
													<div v-for="(item, index) in user_history.task_history" :key="index">
														<span>{{ item.start_time }}至{{ item.end_time }}</span>
														<span>{{ item.enterprise_name }}</span>
														<span>{{ item.position }}</span>
													</div>
												</div>
												<div v-if="user_history.task_history.length == 0">
													无
												</div>
											</div>
											<div class="show_line">
												<div style="width: 110px; text-align: right;">学历：</div>
												<div v-if="user_history.education != ''">
													<div>
														<span>{{ user_history.education }}</span>
													</div>
												</div>
												<div v-if="user_history.education == ''">
													<div>
														<span>无</span>
													</div>
												</div>
											</div>
											<div class="show_line">
												<div style="width: 110px; text-align: right;">常驻地址：</div>
												<div v-if="user_history.address != ''">
													<div>
														<span>{{ user_history.address }}&nbsp;{{ user_history.detailed_address }}</span>
													</div>
												</div>
												<div v-if="user_history.address == ''">
													<div>
														<span>无</span>
													</div>
												</div>
											</div>
										</div>
									</div>
									<div>
										<span
											class="pointer u text-primary"
											@mouseover="cellMouseEnter(row)"
											@mouseout="cellMouseLeave"
											@click="toPersonnelListHx(row)"
											>{{ row.name }}</span
										>
										<span
											v-if="row.newPeople == 1"
											style="background: #c93a32; color: #fff; padding: 2px 3px; border-radius: 3px;"
											>新</span
										>
										<span
											v-if="row.is_hui == 1"
											style="background: #c93a32; color: #fff; padding: 2px 3px; border-radius: 3px;"
											>回</span
										>
									</div>
								</el-tooltip>
							</template>
						</el-table-column>
						<el-table-column prop="mobile" label="电话" width="110">
							<template slot-scope="{ row, $index }">
								<span>{{ row.mobile }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="level" label="星级" width="50">
							<template slot-scope="{ row, $index }">
								<span>{{ row.level }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="gender" label="性别" width="50">
							<template slot-scope="{ row, $index }">
								<span v-if="row.gender == 'male'">男</span>
								<span v-if="row.gender == 'female'">女</span>
								<span v-if="row.gender == 'other'">未知</span>
							</template>
						</el-table-column>
						<el-table-column prop="age" label="年龄" width="50">
							<template slot-scope="{ row, $index }">
								<span>{{ row.age }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="is_set" label="设置类别" width="70">
							<template slot-scope="{ row, $index }">
								<span v-if="row.is_set == 1" class="text-success">日程确认</span>
								<span v-if="row.is_set == 2">接活设置</span>
							</template>
						</el-table-column>
						<el-table-column prop="is_over" label="分配状态" width="70">
							<template slot-scope="{ row, $index }">
								<span v-if="row.is_over == 1" class="text-success">已分配</span>
								<span v-if="row.is_over == 3" style="color: #8400ff;">部分分配</span>
								<span v-if="row.is_over == 2" class="text-danger">未分配</span>
							</template>
						</el-table-column>
						<el-table-column prop="task_hours" label="已分配时长" width="60">
							<!-- <template slot-scope="{ row, $index }">
                                <span style="cursor: pointer;" @click="alertTasklist(row)" class="text-primary">{{row.task_hours}}h</span>
                            </template> -->
							<template slot-scope="{ row, $index }">
								<el-tooltip effect="dark" placement="top" :open-delay="500" v-if="row.task_info.length != 0">
									<div slot="content">
										<div v-for="(item, index) in row.task_info" :key="index" style="margin-bottom: 10px;">
											<span class="mr_10 mb_10">{{ item.shop_name }}</span>
											<span class="mr_10 mb_10">{{ item.job_name }}</span>
											<span class="mr_10 mb_10">{{ item.start_time }}-{{ item.end_time }}</span>
										</div>
									</div>
									<div>
										<h4 style="cursor: pointer;" @click="alertTasklist(row)">{{ row.task_hours }}h</h4>
									</div>
								</el-tooltip>
								<div v-if="row.task_info.length == 0">
									<h4 style="cursor: pointer;" @click="alertTasklist(row)">{{ row.task_hours }}h</h4>
								</div>
							</template>
						</el-table-column>
						<el-table-column prop="free_hours" label="空闲时长" width="55">
							<template slot-scope="{ row, $index }">
								<!-- <div>
                                    <h4 style="cursor: pointer;">{{row.free_hours}}h</h4>
                                </div> -->
								<span>{{ row.free_hours }}h</span>
							</template>
						</el-table-column>
						<el-table-column prop="free_times" label="空闲时段" width="185">
							<template slot-scope="{ row, $index }">
								<el-tooltip effect="dark" placement="top" :open-delay="500">
									<div slot="content">
										<div v-for="(item, index) in user_historySD" :key="index">
											<span class="mr_10 mb_10">{{ item.week }}</span>
											<span class="mr_10 mb_10" v-for="(itemarr, indexss) in item.free_time" :key="indexss"
												>{{ itemarr[0] }}-{{ itemarr[1] }}</span
											>
											<span class="mb_10" v-if="item.is_set == 1">日程</span>
											<span class="mb_10" v-if="item.is_set == 2">偏好</span>
										</div>
									</div>

									<div @mouseover="cellMouseEnterSD(row)" @mouseout="cellMouseEnterSDLeave">
										<div v-if="row.free_times.length != 0">
											<span
												style="cursor: pointer; margin: 0 5px;"
												v-for="(items, indexs) in row.free_times"
												:key="indexs"
												>{{ items }}</span
											>
										</div>
										<div v-if="row.free_times.length == 0">
											<h4 style="cursor: pointer;">全天休息</h4>
										</div>
									</div>
								</el-tooltip>
							</template>
						</el-table-column>
						<el-table-column prop="work_hours" label="可上岗时长" width="60">
							<template slot-scope="{ row, $index }">
								<!-- <div>
                                    <h4 style="cursor: pointer;">{{row.work_hours}}h</h4>
                                </div> -->
								<span>{{ row.work_hours }}h</span>
							</template>
						</el-table-column>
						<el-table-column prop="score" label="优先级评分" width="60">
							<template slot-scope="{ row, $index }">
								<el-tooltip effect="dark" placement="top" v-if="row.score_desc.length != 0">
									<div slot="content">
										<span class="tooltip" v-for="(item, index) in row.score_desc" :key="index">{{ item }}</span>
									</div>
									<!-- <span style="cursor: pointer;">{{row.score | filterNumber}}</span> -->
									<h4 style="cursor: pointer;">{{ row.score | filterNumber }}</h4>
								</el-tooltip>
								<div v-if="row.score_desc.length == 0">
									<!-- <span style="cursor: pointer;">{{row.score | filterNumber}}</span> -->
									<h4 style="cursor: pointer;">{{ row.score | filterNumber }}</h4>
								</div>
							</template>
						</el-table-column>
						<el-table-column prop="week_days" label="周可出工天数" width="70">
							<template slot-scope="{ row, $index }">
								<!-- <span class="text-primary">{{row.week_days}}h</span> -->
								<span>{{ row.week_days }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="job_types" label="岗位" width="120">
							<template slot-scope="{ row, $index }">
								<span>{{ row.job_types }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="job_areas" label="出工商圈" width="120">
							<template slot-scope="{ row, $index }">
								<span>{{ row.job_areas }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="last_7days" label="出工次数7天/总出工次数" width="95">
							<template slot-scope="{ row, $index }">
								<span>{{ row.last_7days }}/{{ row.task_sum }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="certificate_health_status" label="健康证" width="80">
							<template slot-scope="{ row, $index }">
								<span class="text-success" v-if="row.certificate_health_status == '1'">有</span>
								<span class="text-danger" v-if="row.certificate_health_status == '2'">无</span>
							</template>
						</el-table-column>
						<el-table-column label="操作" min-width="110" fixed="right" align="center">
							<template slot-scope="{ row, $index }">
								<el-button type="success" round size="mini" @click="stop_fp(row)" v-if="status != 1"
									>结束分配</el-button
								>
							</template>
						</el-table-column>
					</el-table>
				</template>
			</div>

			<div class="pb_5 px_15 mt_5" id="dd-row-2">
				<el-row>
					<el-col :span="14">
						<div class="fl" style="line-height: 46px; font-size: 13px;">
							已选{{ statistic.task_num }}个任务，时长：{{ statistic.task_hours }}h
						</div>
						<el-button
							size="mini"
							class="fl"
							type="default"
							style="margin: 8px 10px 0;"
							:disabled="fp_state"
							@click="Tofp()"
							>分配</el-button
						>
						<div class="fl" style="line-height: 46px; margin-left: 40px;">
							<span>待分配：{{ (statistic.assigning *= 1) + (statistic.withdraw *= 1) }}</span>
							<span style="margin-left: 20px;">待确认：{{ statistic.assigned }}</span>
						</div>
					</el-col>
				</el-row>
			</div>

			<div class="tableMaxBox">
				<template>
					<el-table
						:data="tasklists"
						stripe
						ref="multipleTablenext"
						@selection-change="handleSelectionChangenext"
						:show-overflow-tooltip="false"
						height="570"
						:span-method="objectSpanMethod"
					>
						<el-table-column prop="name" label="班次" align="center" fixed="left" width="120px">
							<template slot-scope="{ row, $index }">
								<span>{{ row.name }}</span>
							</template>
						</el-table-column>
						<el-table-column type="selection" align="center" :selectable="checkboxT"></el-table-column>
						<el-table-column prop="sn" label="任务编号" width="130px">
							<template slot-scope="{ row, $index }">
								<span class="pointer u text-primary" @click="goToMorerw(row)">{{ row.sn }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="job_name" label="任务名称" width="110px">
							<template slot-scope="{ row, $index }">
								<span v-if="row.sn != ''">{{ row.job_name }} {{ row.hour_expect }}h</span>
							</template>
						</el-table-column>
						<el-table-column prop="start_date" label="任务日期" width="80px">
							<template slot-scope="{ row, $index }">
								<span v-if="row.sn != ''">{{ s_next_date | Interceptions }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="end_date" label="开始/结束时间" width="100px">
							<template slot-scope="{ row, $index }">
								<span v-if="row.sn != ''">{{ row.start_date | Interception }}-{{ row.end_date | Interception }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="task_description" label="要求" width="100px">
							<template slot-scope="{ row, $index }">
								<span>{{ row.task_description }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="shop_name" label="店铺名称" width="270px">
							<template slot-scope="{ row, $index }">
								<el-tooltip effect="dark" placement="top" v-if="row.shop_remark != '' || row.contact != ''">
									<div slot="content">
										<span class="">店铺负责人：{{ row.contact }}&nbsp;&nbsp;{{ row.contact_phone }}</span>
										<span class="tooltip">{{ row.shop_remark }}</span>
									</div>
									<div>
										<span
											v-if="row.shop_is_halal == 1"
											style="background: #c93a32; color: #fff; padding: 2px 3px; border-radius: 3px;"
											>清真</span
										>
										<span class="pointer u text-primary" @click="shopList(row)">{{ row.shop_name }}</span>
									</div>
								</el-tooltip>
								<div v-if="row.shop_remark == '' && row.contact == ''">
									<div>
										<span
											v-if="row.shop_is_halal == 1"
											style="background: #c93a32; color: #fff; padding: 2px 3px; border-radius: 3px;"
											>清真</span
										>
										<span class="pointer u text-primary" @click="shopList(row)">{{ row.shop_name }}</span>
									</div>
								</div>
							</template>
						</el-table-column>
						<el-table-column prop="address" label="店铺地址" :show-overflow-tooltip="true" min-width="120px">
							<template slot-scope="{ row, $index }">
								<span
									v-if="row.sn != '' && row.detailed_address != ''"
									class="pointer u text-primary"
									@click="shop_map(row.location.coordinates, row.shop_name)"
									>{{ row.address }}({{ row.detailed_address }})</span
								>
								<span
									v-if="row.sn != '' && row.detailed_address == ''"
									class="pointer u text-primary"
									@click="shop_map(row.location.coordinates, row.shop_name)"
									>{{ row.address }}</span
								>
							</template>
						</el-table-column>
						<el-table-column prop="area_name" label="商圈" width="110px">
							<template slot-scope="{ row, $index }">
								<span>{{ row.area_name }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="period" label="天数D" width="60px">
							<template slot-scope="{ row, $index }">
								<span>{{ row.period }}</span>
							</template>
						</el-table-column>
						<el-table-column prop="status" label="状态" width="60px">
							<template slot-scope="{ row, $index }">
								<span class="text-success" v-if="row.status == '10'">待分配</span>
								<span class="text-primary" v-if="row.status == '15'">待下发</span>
								<span class="text-primary" v-if="row.status == '20'">已下发</span>
								<span class="text-gray" v-if="row.status == '30'">已确认</span>
								<span class="text-warning" v-if="row.status == '40'">已签到</span>
								<span class="text-warning" v-if="row.status == '50'">已完成</span>
								<span class="text-default" v-if="row.status == '60'">已撤回</span>
								<span class="text-danger" v-if="row.status == '70'">已取消</span>
								<span class="text-success" v-if="row.status == '80'">已结算</span>
							</template>
						</el-table-column>
						<el-table-column prop="sumScore" label="推荐分" width="60px">
							<template slot-scope="{ row, $index }">
								<el-tooltip effect="dark" placement="top" v-if="row.sumScoreInfo.length != 0">
									<div slot="content">
										<span class="tooltip" v-for="(item, index) in row.sumScoreInfo" :key="index">{{ item }}</span>
									</div>
									<span style="cursor: pointer;">{{ row.sumScore }}</span>
								</el-tooltip>
								<div v-if="row.sumScoreInfo.length == 0">
									<span style="cursor: pointer;">{{ row.sumScore }}</span>
								</div>
							</template>
						</el-table-column>
					</el-table>
				</template>
			</div>
		</div>
		<el-dialog :title="diaTitle" :visible.sync="FPShowStop" width="560px" :close-on-click-modal="false">
			<div class="auditCentent">
				<span>确认要将这{{ multipleSelectionnext.length }}个任务分配给该员工吗?</span>
			</div>
			<div slot="footer" class="dialog-footer">
				<span class="btnOK mr_20" @click="assign(1)">确 定</span>
				<span class="resetBtn" @click="hidden()">取 消</span>
			</div>
		</el-dialog>
		<el-dialog :title="diaTitle" :visible.sync="FPShowStopNext" width="560px" :close-on-click-modal="false">
			<div class="auditCentent">
				<span>确认要将这个任务结束分配吗?</span>
			</div>
			<div slot="footer" class="dialog-footer">
				<span class="btnOK mr_20" @click="assignStop()">确 定</span>
				<span class="resetBtn" @click="FPShowStopNext = false">取 消</span>
			</div>
		</el-dialog>
		<el-dialog title="分配提示" :visible.sync="AssignmentTips" width="560px" :close-on-click-modal="false">
			<div class="auditCentent">
				<span>以下原因系统认为分配不合理，确定要继续分配吗?</span>
				<div style="margin-top: 20px;">
					<p v-for="(item, index) in AssignmentTips_reason" :key="index">{{ item }}</p>
				</div>
			</div>
			<div slot="footer" class="dialog-footer">
				<span class="btnOK mr_20" @click="assign(2)">确 定</span>
				<span class="resetBtn" @click="hidden()">取 消</span>
			</div>
		</el-dialog>
		<!-- 撤回弹框 -->
		<el-dialog :title="diaTitle" :visible.sync="NextShow" width="560" :close-on-click-modal="false">
			<div class="auditCentent">
				<el-table :data="demandInfowhere" stripe>
					<el-table-column prop="task_sn" label="任务编号">
						<template slot-scope="{ row, $index }">
							<span class="u text-primary" style="cursor: pointer;" @click="goToMore(row)">{{ row.task_sn }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="shop_name" label="店铺名称">
						<template slot-scope="{ row, $index }">
							<span class="u text-primary" style="cursor: pointer;" @click="goToMore(row)">{{ row.shop_name }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="job_name" label="任务名称">
						<template slot-scope="{ row, $index }">
							<span class="u text-primary" style="cursor: pointer;" @click="goToMore(row)"
								>{{ row.job_name }}&nbsp;&nbsp;{{ row.hour_expect }}h</span
							>
						</template>
					</el-table-column>
					<el-table-column prop="start_time" label="任务开始/结束时间">
						<template slot-scope="{ row, $index }">
							<span>{{ row.start_time }} - {{ row.end_time }}</span>
						</template>
					</el-table-column>
					<el-table-column label="操作" fixed="right" align="center">
						<template slot-scope="{ row, $index }">
							<el-link :underline="false" type="danger" @click="withdraw(row, $index)">撤回</el-link>
						</template>
					</el-table-column>
				</el-table>
			</div>
		</el-dialog>
		<!-- 任务撤销 -->
		<!-- 任务撤销 -->
		<el-dialog
			:title="diaTitle"
			:visible.sync="StateShowcx"
			width="560"
			:close-on-click-modal="false"
			@close="hiddenRY"
		>
			<div class="auditCentent">
				<div class="row-info clear">
					<div class="fl title-key"><i class="lhadmin"></i><span>责任方：</span></div>
					<div class="fl list-cont">
						<el-select v-model="revoke.zrf" placeholder="请选择">
							<el-option v-for="(item, index) in all_revoke.withdraw" :key="index" :label="item.name" :value="index">{{
								item.name
							}}</el-option>
						</el-select>
					</div>
				</div>
				<div class="row-info clear">
					<div class="fl title-key"><i class="lhadmin"></i><span>类型：</span></div>
					<div class="fl list-cont">
						<el-select v-model="revoke.type" placeholder="请选择">
							<el-option v-for="(item, index) in revoke_type" :key="index" :label="item.name" :value="index">{{
								item.name
							}}</el-option>
						</el-select>
					</div>
				</div>
				<div class="row-info clear">
					<div class="fl title-key"><i class="lhadmin"></i><span>原因：</span></div>
					<div class="fl list-cont">
						<el-select v-model="revoke.reason" placeholder="请选择">
							<el-option v-for="item in revoke_reason" :key="item.id" :label="item.title" :value="item.id"></el-option>
						</el-select>
					</div>
				</div>
				<div class="row-info clear">
					<div class="fl title-key"><i class="lhadmin"></i><span>备注：</span></div>
					<div class="fl list-cont">
						<el-input type="textarea" :rows="8" :cols="44" placeholder="" v-model="revoke.bz"></el-input>
					</div>
				</div>
			</div>
			<div slot="footer" class="dialog-footer">
				<span class="btnOK mr_20" @click="addCxBtn()">确 定</span>
				<span class="resetBtn" @click="hiddenRY">取 消</span>
			</div>
		</el-dialog>
	</div>
</template>

<script>
var common = require('../../../static/tool.js')
import { mainfun } from '../../../assets/js/main.js'
import { publicData } from '../../../assets/js/data.js'
export default {
	name: 'PeopleForWork',
	data() {
		return {
			windowSizeHeight: document.documentElement.clientHeight, //浏览器可视化窗口的大小
			screenHeight: document.documentElement.clientHeight,
			manageInfo: JSON.parse(sessionStorage.getItem('manageInfo')), //登录信息
			url: common.url,
			head_url: common.head_url,

			//搜索对应值
			s_staff_name: '',
			s_mobile: '',
			s_next_date: '',
			s_next_date2: '',
			s_area_id: [],
			s_area_id_bf: [],
			s_type_id: '',
			s_sc_start: '0',
			s_sc_next: '11',
			// 总出工次数
			s_cg_start: '0',
			s_cg_next: '',
			// 审核天数
			s_sh_start: '0',
			s_sh_next: '',

			s_next_sex: '',
			s_next_start: '',
			s_next_next: '',

			//列表项
			areaList: [], //区域列表
			demandList: [], //人员列表
			tasklists: [], //任务列表
			TypeArr: [], //岗位列表
			all_revoke: [],
			//撤销相关
			revoke: {
				zrf: '',
				type: '',
				reason: '',
				bz: ''
			},
			revoke_type: [], //撤销类型列表
			revoke_reason: [], //撤销原因列表
			user_history: {
				avatar: '',
				education: '无',
				level: 0,
				service_history: [],
				task_history: [],
				address: '',
				detailed_address: ''
			}, //请求人员资料信息
			user_historySD: [], //请求空闲时段信息
			demandInfowhere: [], //点击已分配时长-任务列表

			//方法类
			ids: '',
			sn: '',
			status: '2',
			multipleSelection: '',
			multipleSelectionnext: '',
			FPShowStop: false,
			FPShowStopNext: false,
			NextShow: false,
			StateShowcx: false, //撤回的弹框
			fp_state: true,
			AssignmentTips: false, //强制分配提示
			AssignmentTips_reason: [],
			diaTitle: '',
			is_over_1: '', // 第三个
			is_over_2: '', // 第一个
			not_assigned: '',
			colors: ['#cf2e22', '#cf2e22', '#cf2e22'], //颜色设定
			part_assigned: '', //  这个是中间按钮的数字
			statistic: {
				task_num: '0',
				task_hours: '0',
				assigning: '0',
				withdraw: '0',
				assigned: '0'
			},
			staff_name: '',
			staff_id: '',

			//组件-分页
			total: 0,
			pageNum: '',
			pageSizeNow: '',
			areaStatus: true
		}
	},
	computed: {
		//撤销相关
		poke_zrf() {
			return this.revoke.zrf.toString()
		},
		//撤销相关
		poke_type() {
			return this.revoke.type.toString()
		}
	},
	watch: {
		//撤销-责任方改变
		poke_zrf(newValue, oldValue) {
			if (newValue != '') {
				this.revoke.type = '' //类型清空
				this.revoke.reason = '' //原因清空
				this.revoke_type = [] //撤销类型列表清空
				this.revoke_reason = [] //撤销原因列表清空
				this.revoke_type = this.all_revoke.withdraw[newValue].child
			} else {
				this.revoke.type = '' //类型清空
				this.revoke.reason = '' //原因清空
				this.revoke_type = [] //撤销类型列表清空
				this.revoke_reason = [] //撤销原因列表清空
				this.revoke_type = []
			}
		},
		//撤销-类型改变
		poke_type(newValue, oldValue) {
			if (newValue != '') {
				this.revoke.reason = '' //原因清空
				this.revoke_reason = this.revoke_type[newValue].child
			} else {
				this.revoke.reason = '' //原因清空
				this.revoke_reason = []
			}
		},
		multipleSelection(newValue, oldValue) {
			if (newValue != '') {
				this.fp_state = true
				this.TaskList(newValue)
			} else {
				this.fp_state = true
				this.defineData()
			}
		},
		//商圈改变
		areaList(newValue, oldValue) {
			if (oldValue == '') {
				this.listShop()
			}
		}
	},
	created() {
		this.defineData()
		this.s_next_date = mainfun.setdate(1)
		this.s_next_date2 = mainfun.setdate(2)
		this.listArea()
		this.alljob_type()
		//取消和撤销原因接口
		let fn = new FormData()
		this.$http.post(this.url + '/reason/reasonList', fn).then(
			res => {
				if (res.data.msg == '查询成功！' || res.data.code == '200') {
					this.all_revoke = res.data.data
				} else if (res.data.code == '8886') {
					//code   8886  登录过期
					sessionStorage.clear()
					this.$alert('登录已过期，请重新登录 !', '提示', {
						confirmButtonText: '确定',
						callback: action => {
							window.location = 'login.html'
						}
					})
					return
				} else {
					this.$message.error(res.data.msg)
					return
				}
			},
			res => {
				this.$message.error('网络错误！')
				return
			}
		)
	},
	mounted() {},
	methods: {
		// 获取商圈列表
		listArea() {
			let fn = new FormData()
			this.$http.post(this.url + '/area/list', fn).then(
				res => {
					if (res.data.msg == '查询成功' || res.data.code == '200') {
						if (res.data.data != null) {
							res.data.data.list.forEach(item => {
								item.value = item.area_name
							})
							this.areaList = res.data.data.list
							// 默认选中非平谷的
							this.areaList.forEach(element => {
								// 平谷
								if (element.area_name != '平谷') {
									var pusharr = element.id
									this.s_area_id.push(pusharr)
									this.s_area_id_bf.push(pusharr)
								}
							})
						} else {
							this.areaList = []
						}
					} else if (res.data.code == '8886') {
						//code   8886  登录过期
						sessionStorage.clear()
						this.$alert('登录已过期，请重新登录 !', '提示', {
							confirmButtonText: '确定',
							callback: action => {
								window.location = 'login.html'
							}
						})
						return
					} else {
						this.$message.error(res.data.msg)
						return
					}
				},
				res => {
					this.$message.error('网络错误！')
					return
				}
			)
		},
		//标签接口
		alljob_type() {
			let fn = new FormData()
			fn.append('label_type', 'job_type')
			this.$http.post(this.url + '/label/list', fn).then(
				res => {
					if (res.data.msg == '查询成功' || res.data.code == '200') {
						this.TypeArr = res.data.data
					} else if (res.data.code == '8886') {
						//code   8886  登录过期
						sessionStorage.clear()
						this.$alert('登录已过期，请重新登录 !', '提示', {
							confirmButtonText: '确定',
							callback: action => {
								window.location = 'login.html'
							}
						})
						return
					} else {
						this.$message.error(res.data.msg)
						return
					}
				},
				res => {
					this.$message.error('网络错误！')
					return
				}
			)
		},
		// 搜索
		shearchBtn() {
			this.pageNum = 1
			this.listShop() //上面列表数据
		},
		//切换
		tagstate(e) {
			this.status = e
			this.pageNum = 1
			this.listShop() //上面列表数据
		},
		//人员列表
		listShop() {
			//查询上面数量
			this.getNum()
			//查询下面数量
			this.statistics_sum()
			let fn = new FormData()
			fn.append('pageSize', this.pageSizeNow) //每页多少条
			fn.append('page', this.pageNum) //页数
			fn.append('name', this.s_staff_name)
			fn.append('mobile', this.s_mobile)
			fn.append('job_areas', this.s_area_id)
			fn.append('job_types', this.s_type_id)
			fn.append('work_date_start', this.s_next_date + ' 00:00:00')
			fn.append('work_date_end', this.s_next_date + ' 23:59:00')
			fn.append('task_hours_start', this.s_sc_start)
			fn.append('task_hours_end', this.s_sc_next)
			fn.append('gender', this.s_next_sex)
			fn.append('age_start', this.s_next_start)
			fn.append('age_end', this.s_next_next)
			fn.append('is_over', this.status)
			fn.append('work_status', 1)
			fn.append('source', 'personFindTask')

			// 总出工次数-传值判断
			if (this.s_cg_start == '' || this.s_cg_next == '') {
				fn.append('task_sum_start', '')
				fn.append('task_sum_end', '')
			} else {
				fn.append('task_sum_start', this.s_cg_start)
				fn.append('task_sum_end', this.s_cg_next)
			}
			// 审核天数-传值判断
			if (this.s_sh_start == '' || this.s_sh_next == '') {
				fn.append('audit_day_start', '')
				fn.append('audit_day_end', '')
			} else {
				fn.append('audit_day_start', this.s_sh_start)
				fn.append('audit_day_end', this.s_sh_next)
			}

			this.$http.post(this.url + '/schedule/list', fn).then(
				res => {
					if (res.data.msg == '查询成功！' || res.data.code == '200') {
						if (res.data.data != null) {
							var demandList = res.data.data.list
							this.demandList = demandList
							this.total = res.data.data.count
						} else {
							this.demandList = []
							this.total = 0
						}
					} else if (res.data.code == '8886') {
						//code   8886  登录过期
						sessionStorage.clear()
						this.$alert('登录已过期，请重新登录 !', '提示', {
							confirmButtonText: '确定',
							callback: action => {
								window.location = 'login.html'
							}
						})
						return
					} else {
						this.$message.error(res.data.msg)
						return
					}
				},
				res => {
					this.$message.error('网络错误！')
					return
				}
			)
		},
		//统计接口-上面
		getNum() {
			let fn = new FormData()
			// fn.append("work_date", this.s_next_date);
			fn.append('name', this.s_staff_name)
			fn.append('mobile', this.s_mobile)
			fn.append('job_areas', this.s_area_id)
			fn.append('job_types', this.s_type_id)
			fn.append('work_date_start', this.s_next_date + ' 00:00:00')
			fn.append('work_date_end', this.s_next_date + ' 23:59:00')
			fn.append('task_hours_start', this.s_sc_start)
			fn.append('task_hours_end', this.s_sc_next)
			fn.append('gender', this.s_next_sex)
			fn.append('age_start', this.s_next_start)
			fn.append('age_end', this.s_next_next)
			fn.append('is_over', this.status)
			fn.append('work_status', 1)
			this.$http.post(this.url + '/schedule/statistics', fn).then(
				res => {
					if (res.data.msg == '查询成功！' || res.data.code == '200') {
						this.is_over_2 = res.data.data.is_over_2
						this.is_over_1 = res.data.data.is_over_1
						this.not_assigned = res.data.data.not_assigned
						this.part_assigned = res.data.data.part_assigned
					} else if (res.data.code == '8886') {
						//code   8886  登录过期
						sessionStorage.clear()
						this.$alert('登录已过期，请重新登录 !', '提示', {
							confirmButtonText: '确定',
							callback: action => {
								window.location = 'login.html'
							}
						})
						return
					} else {
						this.$message.error(res.data.msg)
						return
					}
				},
				res => {
					this.$message.error('网络错误！')
					return
				}
			)
		},
		statistics_sum() {
			let fn_statistics = new FormData()
			fn_statistics.append('work_date', this.s_next_date)
			fn_statistics.append('area_id', this.s_area_id)
			fn_statistics.append('label_id', this.s_type_id)
			//任务统计条数
			this.$http.post(this.url + '/task/person_statistics', fn_statistics).then(
				res => {
					if (res.data.msg == '请求成功' || res.data.code == '200') {
						if (res.data.data != null) {
							var statistic = res.data.data
							this.statistic.assigning = statistic.assigning //待分配（待确认+已撤销）
							this.statistic.withdraw = statistic.withdraw //已撤销
							this.statistic.assigned = statistic.assigned //待确认
						}
					} else {
						this.$message.error(res.data.msg)
						return
					}
				},
				res => {
					this.$message.error('网络错误！')
					return
				}
			)
		},
		//任务列表
		TaskList(e) {
			this.defineData()
			let fn = new FormData()
			fn.append('staff_sn', this.multipleSelection)
			fn.append('workDate', this.s_next_date)
			this.$http.post(this.url + '/task/personFindTask', fn).then(
				res => {
					if (res.data.code == '200') {
						if (res.data.data != null) {
							var tasklists = res.data.data
							//早班
							tasklists[0].data[0] != undefined ? this.$set(this.tasklists, 0, tasklists[0].data[0]) : ''
							tasklists[0].data[1] != undefined ? this.$set(this.tasklists, 1, tasklists[0].data[1]) : ''
							tasklists[0].data[2] != undefined ? this.$set(this.tasklists, 2, tasklists[0].data[2]) : ''
							this.tasklists[0].name = this.tasklists[1].name = this.tasklists[2].name = '早班'
							// //中班
							tasklists[1].data[0] != undefined ? this.$set(this.tasklists, 3, tasklists[1].data[0]) : ''
							tasklists[1].data[1] != undefined ? this.$set(this.tasklists, 4, tasklists[1].data[1]) : ''
							tasklists[1].data[2] != undefined ? this.$set(this.tasklists, 5, tasklists[1].data[2]) : ''
							this.tasklists[3].name = this.tasklists[4].name = this.tasklists[5].name = '中班'
							// //晚班
							tasklists[2].data[0] != undefined ? this.$set(this.tasklists, 6, tasklists[2].data[0]) : ''
							tasklists[2].data[1] != undefined ? this.$set(this.tasklists, 7, tasklists[2].data[1]) : ''
							tasklists[2].data[2] != undefined ? this.$set(this.tasklists, 8, tasklists[2].data[2]) : ''
							this.tasklists[6].name = this.tasklists[7].name = this.tasklists[8].name = '晚班'
							// //夜班
							tasklists[3].data[0] != undefined ? this.$set(this.tasklists, 9, tasklists[3].data[0]) : ''
							tasklists[3].data[1] != undefined ? this.$set(this.tasklists, 10, tasklists[3].data[1]) : ''
							tasklists[3].data[2] != undefined ? this.$set(this.tasklists, 11, tasklists[3].data[2]) : ''
							this.tasklists[9].name = this.tasklists[10].name = this.tasklists[11].name = '夜班'
						} else {
							this.tasklists = []
						}
					} else if (res.data.code == '8886') {
						//code   8886  登录过期
						sessionStorage.clear()
						this.$alert('登录已过期，请重新登录 !', '提示', {
							confirmButtonText: '确定',
							callback: action => {
								window.location = 'login.html'
							}
						})
						return
					} else {
						this.$message.error(res.data.msg)
						return
					}
				},
				res => {
					this.$message.error('网络错误！')
					return
				}
			)
		},
		resetBtn() {
			//重置
			this.resetData() //重置请求数据
			this.pageNum = 1
			this.listShop()
		},
		resetData() {
			//重置请求数据
			this.s_staff_name = ''
			this.s_mobile = ''
			this.s_next_date = mainfun.setdate(1)
			this.s_next_date2 = mainfun.setdate(2)
			this.s_area_id = this.s_area_id_bf
			this.s_type_id = ''
			this.s_sc_start = '0'
			this.s_sc_next = '11'
			this.s_cg_start = '0'
			this.s_cg_next = ''
			this.s_sh_start = '0'
			this.s_sh_next = ''
			this.s_next_sex = ''
			this.s_next_start = ''
			this.s_next_next = ''
			this.multipleSelection = ''
		},
		//获取选中行的id
		handleSelectionChange(val) {
			if (val.length == 0) {
				//取消选中的多选框
				this.multipleSelection = ''
			} else {
				if (val.length >= 1) {
					let arrays = val.splice(0, val.length - 1)
					arrays.forEach(row => {
						this.$refs.multipleTable.toggleRowSelection(row) //除了当前点击的，其他的全部取消选中
					})
					this.multipleSelection = val[0].staff_sn
					this.staff_name = val[0].name
					this.staff_id = val[0].staff_id
				}
			}
		},
		//获取选中行的id
		handleSelectionChangenext(val) {
			//获取用户的选中
			this.multipleSelectionnext = []
			var hour_expect = 0
			val.forEach(item => {
				if (item.sn != '') {
					this.multipleSelectionnext.push(item.sn)
					hour_expect += item.hour_expect
				}
			})
			this.multipleSelectionnext = Array.from(new Set(this.multipleSelectionnext))
			if (this.multipleSelectionnext.length != 0) {
				this.fp_state = false
				this.statistic.task_num = this.multipleSelectionnext.length
				this.statistic.task_hours = hour_expect
			} else {
				this.fp_state = true
			}
		},
		//设置表格复选框禁用
		checkboxT(row, index) {
			if (row.sn != '') {
				return true
			} else {
				return false
			}
		},
		//分配
		Tofp(e, index) {
			this.FPShowStop = true //分配任务
			this.diaTitle = '确认分配'
		},
		//分页组件->子组件传值
		onChildValue(item) {
			this.pageNum = item[0]
			this.pageSizeNow = item[1]
			if (this.s_next_date != '') {
				if (this.areaList.length > 0) {
					this.listShop()
				}
			}
		},
		//合并列
		objectSpanMethod({ row, column, rowIndex, columnIndex }) {
			if (columnIndex === 0) {
				if (rowIndex % 3 === 0) {
					return {
						rowspan: 3,
						colspan: 1
					}
				} else {
					return {
						rowspan: 0,
						colspan: 0
					}
				}
			}
		},
		//跳转任务详情
		goToMorerw(row) {
			const { href } = this.$router.resolve({
				path: '/roleMain',
				query: {
					rl_id: row.demand_id,
					rl_sn: row.demand_sn,
					task_id: row.id,
					task_sn: row.sn,
					start_date: this.s_next_date
				}
			})
			window.open(href, '_blank')
		},
		//跳转店铺列表
		shopList(row) {
			const { href } = this.$router.resolve({
				path: '/shopList',
				query: { shop_name: row.shop_name, shop_id: row.shop_id }
			})
			window.open(href, '_blank')
		},
		//跳转店铺-坐标
		shop_map(row, name) {
			window.open(
				'https://uri.amap.com/marker?position=' +
					row[0] +
					',' +
					row[1] +
					'&name=' +
					name +
					'&src=mypage&coordinate=gaode&callnative=0',
				'_blank'
			)
		},
		//全选-取消全选商圈
		selectAllArea() {
			let arr = []
			this.areaList.forEach(item => {
				arr.push(+item.id)
			})
			if (this.areaStatus == true) {
				this.s_area_id = arr
			} else {
				this.s_area_id = []
			}
			this.areaStatus = !this.areaStatus
			// this.shearchBtn()
		},
		//跳转人才画像
		toPersonnelListHx(row) {
			const { href } = this.$router.resolve({ path: '/personnelListHx', query: { id: row.staff_id } })
			window.open(href, '_blank')
		},
		//进入单元行
		cellMouseEnter(row, column, cell, event) {
			publicData.isShowLoading = false
			// mainfun.endLoading();//清空加载框
			// if(row.staff_id!=this.mouseoverdata){
			// 请求人员资料信息
			let fn = new FormData()
			fn.append('staff_id', row.staff_id)
			// setTimeout(()=>{
			this.$http.post(this.url + '/user/history', fn).then(
				res => {
					if (res.data.msg == '操作成功！' || res.data.code == '200') {
						var user_history = res.data.data
						if (user_history.avatar != undefined) {
							// 头像判断
							if (user_history.avatar == '') {
								user_history.avatar = this.head_url + 'images/160102759620181.png'
							} else {
								if (user_history.avatar.indexOf('https') == -1) {
									// 自己传的头像
									user_history.avatar = this.head_url + user_history.avatar
								} else {
									// 微信头像
									user_history.avatar = user_history.avatar
								}
							}
							this.user_history = user_history
						} else {
							this.user_history = {
								avatar: this.head_url + 'images/160102759620181.png',
								education: '无',
								level: 0,
								service_history: [],
								task_history: [],
								address: '',
								detailed_address: ''
							}
						}
					}
				},
				res => {}
			)
			// this.mouseoverdata = row.staff_id;
			// },300);
			// }
		},
		// 离开单元行
		cellMouseLeave() {
			setTimeout(() => {
				publicData.isShowLoading = true
			}, 1000)
		},
		//进入单元行
		cellMouseEnterSD(row, column, cell, event) {
			// console.log(row);
			publicData.isShowLoading = false
			// mainfun.endLoading();//清空加载框
			// if(row.staff_id!=this.mouseoverdataSD){
			// 请求人员资料信息
			let fn = new FormData()
			fn.append('work_date', this.s_next_date)
			fn.append('staff_sn', row.staff_sn)
			setTimeout(() => {
				this.$http.post(this.url + '/dispatch/staffScheduleList', fn).then(
					res => {
						if (res.data.msg == '操作成功！' || res.data.code == '200') {
							this.user_historySD = res.data.data.list
						}
					},
					res => {}
				)
				// this.mouseoverdataSD = row.staff_id;
			}, 300)
			// }
		},
		// 离开单元行
		cellMouseEnterSDLeave() {
			setTimeout(() => {
				publicData.isShowLoading = true
			}, 1000)
		},
		//进行分配
		assign(e) {
			let fn = new FormData()
			fn.append('sn', this.multipleSelectionnext.toString())
			fn.append('staff_sn', this.multipleSelection)
			fn.append('staff_name', this.staff_name)
			fn.append('staff_id', this.staff_id)
			fn.append('log_data', '')
			if (e == 2) {
				fn.append('force', 1) //任务超过11小时，还是继续分配
			}

			// this.$http.post(this.url + '/task/assigned', fn).then(
			this.$http.post(this.url + '/task/issued', fn).then(
				res => {
					if (res.data.msg == '操作成功！' || res.data.code == '200') {
						this.$message.success(res.data.msg)
						setTimeout(() => {
							this.FPShowStop = false
							this.AssignmentTips = false
							this.pageNum = 1
							this.listShop()
							// this.resetData(); //重置请求数据
							this.AssignmentTips_reason = []
						}, 1000)
					} else if (res.data.code == '8886') {
						//code   8886  登录过期
						sessionStorage.clear()
						this.$alert('登录已过期，请重新登录 !', '提示', {
							confirmButtonText: '确定',
							callback: action => {
								window.location = 'login.html'
							}
						})
						return
					} else if (res.data.code == '626') {
						//强制确认的弹框出现
						this.AssignmentTips = true
						this.AssignmentTips_reason = res.data.data
						return
					} else {
						this.$message.error(res.data.msg)
						return
					}
				},
				res => {
					this.$message.error('网络错误！')
					return
				}
			)
		},
		stop_fp(row) {
			this.ids = row.id
			this.FPShowStopNext = true //结束分配
			this.diaTitle = '结束分配'
		},
		//结束分配
		assignStop() {
			let fn = new FormData()
			fn.append('id', this.ids)

			this.$http.post(this.url + '/schedule/saveSchedule', fn).then(
				res => {
					if (res.data.code == '200') {
						this.$message.success(res.data.msg)
						setTimeout(() => {
							this.FPShowStopNext = false
							this.pageNum = 1
							this.listShop()
							// this.resetData(); //重置搜索数据
						}, 1000)
					} else if (res.data.code == '8886') {
						//code   8886  登录过期
						sessionStorage.clear()
						this.$alert('登录已过期，请重新登录 !', '提示', {
							confirmButtonText: '确定',
							callback: action => {
								window.location = 'login.html'
							}
						})
						return
					} else {
						this.$message.error(res.data.msg)
						return
					}
				},
				res => {
					this.$message.error('网络错误！')
					return
				}
			)
		},
		//撤回操作
		alertTasklist(row) {
			// console.log(row);
			this.NextShow = true //撤回操作
			this.diaTitle = '任务列表'
			this.demandInfowhere = row.task_info
		},
		//撤回
		withdraw(e, index) {
			// console.log(e);
			this.sn = e.task_sn
			this.index = index
			this.StateShowcx = true //状态关闭
			this.diaTitle = '撤销任务'
		},
		hiddenRY() {
			this.StateShowcx = false
			this.revoke.zrf = '' //责任方清空
			this.revoke.type = '' //类型清空
			this.revoke.reason = '' //原因清空
			this.revoke.bz = '' //备注清空
			this.revoke_type = [] //撤销类型列表清空
			this.revoke_reason = [] //撤销原因列表清空
		},
		hidden() {
			this.AssignmentTips = false
			this.FPShowStop = false
		},
		//任务撤销
		addCxBtn() {
			let fn = new FormData()
			fn.append('sn', this.sn) //相关id
			fn.append('reason_id', this.revoke.reason) //撤销原因id
			fn.append('remark', this.revoke.bz) //撤销备注

			this.$http.post(this.url + '/task/withdraw', fn).then(
				res => {
					if (res.data.msg == '操作成功！' || res.data.code == '200') {
						this.NextShow = false
						this.hiddenRY()
						this.$message.success(res.data.msg)
						setTimeout(() => {
							this.listShop()
						}, 1000)
					} else if (res.data.code == '8886') {
						//code   8886  登录过期
						sessionStorage.clear()
						this.$alert('登录已过期，请重新登录 !', '提示', {
							confirmButtonText: '确定',
							callback: action => {
								window.location = 'login.html'
							}
						})
						return
					} else {
						this.$message.error(res.data.msg)
						return
					}
				},
				res => {
					this.$message.error('网络错误！')
					return
				}
			)

			//关闭弹框
			this.NextShow = false
			this.hiddenRY()
		},
		//跳转任务详情
		goToMore(row) {
			// console.log(row);
			const { href } = this.$router.resolve({
				path: '/roleMain',
				query: {
					rl_id: row.demand_id,
					rl_sn: row.demand_sn,
					task_id: row.task_id,
					task_sn: row.task_sn,
					start_date: row.task_start_time
				}
			})
			window.open(href, '_blank')
		},
		defineData() {
			this.tasklists = [
				{
					id: 1,
					name: '早班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				},
				{
					id: 2,
					name: '早班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				},
				{
					id: 3,
					name: '早班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				},
				{
					id: 4,
					name: '中班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				},
				{
					id: 5,
					name: '中班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				},
				{
					id: 6,
					name: '中班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				},
				{
					id: 7,
					name: '晚班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				},
				{
					id: 8,
					name: '晚班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				},
				{
					id: 9,
					name: '晚班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				},
				{
					id: 10,
					name: '夜班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				},
				{
					id: 11,
					name: '夜班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				},
				{
					id: 12,
					name: '夜班',
					sn: '', //任务编号
					job_name: '', //任务名称
					hour_expect: '',
					start_date: '', //开始时间
					end_date: '', //结束时间
					task_description: '', //要求
					shop_name: '', //店铺名称
					shop_is_halal: '', //是否清真
					address: '', //店铺地址
					detailed_address: '', //详细地址
					area_name: '', //商圈
					period: '', //天数D
					status: '', //状态
					sumScore: '', //推荐分
					sumScoreInfo: []
				}
			]
		}
	},
	filters: {}
}
</script>

<style scoped>
@import '../../assets/style/PeopleForWork.css';
</style>



// WEBPACK FOOTER //
// src/components/abnormal/PeopleForWork.vue